const defaultState = {
    fees: []

};
export default function orderFee(state = defaultState, action) {
    const {type, payload} = action;
    switch (type) {
        case 'GH_ORDER.UPDATE_ORDER_FEE':
            return {...state, fees: [...payload]};
        case 'GH_ORDER.HIDE_EDIT':
        case 'GH_ORDER.HIDE_CREATE':
            return {...state, fees: []};
        case 'GH_ORDER.SHOW_EDIT':
            const feeList = payload.feeList || [];
            return {...state, fees: [...feeList]};
        default:
            return state;
    }
}

